package com.anjian.bamin.anjiandianzimap.utils;

import com.anjian.bamin.anjiandianzimap.model.CompanyInfo;

import java.util.Comparator;

public class MyComparator implements Comparator<CompanyInfo> {

    public int compare(CompanyInfo o1, CompanyInfo o2) {
        CompanyInfo e1 = o1;
        CompanyInfo e2 = o2;
        return e1.getCompanyPinyin().substring(0, 1).compareTo(e2.getCompanyPinyin().substring(0, 1));
    }
}